30. A Smaller Training Set
A Smaller Training Set
Question:
One way to speed up an algorithm is to train it on a smaller training dataset. The tradeoff is that the accuracy almost always goes down when you do this. Let’s explore this more concretely: add in the following two lines immediately before training your classifier.
features_train = features_train[:len(features_train)/100]
labels_train = labels_train[:len(labels_train)/100]
These lines effectively slice the training dataset down to 1% of its original size, tossing out 99% of the training data. You can leave all other code unchanged.
What’s the accuracy now?
Start Quiz:
